package br.com.sig.financeiro.evento.business.model.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

import br.com.sig.business.model.entity.BaseEntity;
import br.com.sig.cadastro.cliente.business.model.entity.Cliente;

@Entity
@Table(schema="sig_financeiro", name="evento")
public class Evento extends BaseEntity {

	private static final long serialVersionUID = -7454117588149360032L;
	
	private Date data;
	private Cliente cliente;	

	@NotNull
	@Column(nullable = false)
	@Temporal(TemporalType.DATE)	
	public Date getData() {
		return data;
	}

	public void setData(Date data) {
		this.data = data;
	}
	
	@NotNull
	@OneToOne
	@JoinColumn(name = "cliente_id", nullable = false)		
	public Cliente getCliente() {
		return cliente;
	}

	public void setCliente(Cliente cliente) {
		this.cliente = cliente;
	}
}